package com.foredu.fiqs.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Description:<br/>
 * 领域模型：工资条目明细类，工资条目包含若干明细<br/>
 * Date:<br/>
 * 2014/5/13<br/>
 * 
 * @author hushigang
 */

@Entity
@Table(name = "T_SalaryItemDetail")
public class SalaryItemDetail implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;// 工资条目明细ID
	private SalaryItemDetailType type;// 工资条目明细类型
	private float amount;// 金额
	private SalaryItem salaryItem;// 所属工资条目

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column
	public float getAmount() {
		return amount;
	}

	public void setAmount(float amount) {
		this.amount = amount;
	}

	@ManyToOne
	@JoinColumn(name = "salaryItem_id")
	public SalaryItem getSalaryItem() {
		return salaryItem;
	}

	public void setSalaryItem(SalaryItem salaryItem) {
		this.salaryItem = salaryItem;
	}

	@ManyToOne
	@JoinColumn(name = "salaryItemDetailType_id")
	public SalaryItemDetailType getType() {
		return type;
	}
	
	public void setType(SalaryItemDetailType type) {
		this.type = type;
	}	
}
